#include "pset.h" psi_h psi_create( pset ) pset_h pset ; void psi_destroy( iter ) psi_h iter ; void psi_reset( iter, pset ) psi_h iter ; pset_h pset ; void *psi_start( iter ) psi_h iter ; void *psi_next( iter ) psi_h iter ; void psi_remove( iter ) psi_h iter ;
psi_create() creates an iterator. The only operation that should be applied to an iterator after it is created is psi_start().
psi_destroy() destroys the iterator.
psi_reset() changes the pset that is being iterated to pset.
psi_start() starts an iteration and returns the first pointer in the pointer set.
psi_next() returns the next pointer in the set.
psi_remove() removes the current pointer from the set. The current pointer is the one returned most recently from either psi_start() or psi_next().
psi_create() returns an iterator handle on success or NULL on failure.
psi_start() returns the first pointer from the set or NULL if the set is empty.
psi_next() returns a pointer or NULL if the end of the set is reached.